﻿@page "/"

<PageTitle>Home</PageTitle>

<h1 style="color: @y.FontColor;background: @y.BackgroundColor;">Hello, world!</h1>

Welcome to your new app.

@* <RazorClassLibrary1.Component2 Title="父组件传参，子组件接收并显示" src="./_content/RazorClassLibrary1/assets/1.png"></RazorClassLibrary1.Component2> *@
<RazorClassLibrary1.Component2 Title="父组件传参，子组件接收并显示" @attributes="AdditionalAttributes"></RazorClassLibrary1.Component2>

@code {
    public Dictionary<string, object> AdditionalAttributes { get; set; } = new()
    {
        {"src", "./_content/RazorClassLibrary1/assets/2.png"},
        {"alt", "bla"}
    };

    [CascadingParameter]
    public string x { get; set; }

    [CascadingParameter]
    ThemeColor y { get; set; }
}
